package nsu.edu.zsq.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import nsu.edu.zsq.bean.Student;
import nsu.edu.zsq.bean.SysUser;
import nsu.edu.zsq.bean.Teacher;
import nsu.edu.zsq.dao.StudentMapper;
import nsu.edu.zsq.dao.SysUserMapper;
import nsu.edu.zsq.dao.TeacherMapper;
import nsu.edu.zsq.service.LoginService;

/** 
* Description: 登录service的实现类<br>
*/
@Service
public class LoginServiceImpl implements LoginService {
    
    @Autowired
    private StudentMapper studentMapper;
    
    @Autowired
    private TeacherMapper teacherMapper;
    
    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public Student getByStuNo(String stuNo) {
        Student student = studentMapper.getByStuNo(stuNo);
        return student;
    }

    @Override
    public Teacher getByTeacherNo(String teacherNo) {
        Teacher teacher = teacherMapper.getByTeacherNo(teacherNo);
        return teacher;
    }

    @Override
    public SysUser getByAccount(String account) {
        SysUser sysUser = sysUserMapper.getByAccount(account);
        return sysUser;
    }

}
